package cn.edu.scau.dormitory_management_system.service;

import cn.edu.scau.dormitory_management_system.entity.DormEntity;
import cn.edu.scau.dormitory_management_system.entity.dto.StuDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;


import java.util.List;

/**
 * 
 *
 * @author wanglingfu
 * @email 1006340605@qq.com
 * @date 2021-08-02 14:35:10
 */
public interface DormService extends IService<DormEntity> {

    int max();
    public boolean create( DormEntity dormEntity);

    public boolean delete( DormEntity dormEntity);

    public boolean update( DormEntity dormEntity);

    public List<DormEntity> findSpareDorm( int buildId);

    public List<DormEntity> findDormByBuildId( int buildId);

    public List<DormEntity> findDormByDepartment( String department);

    public List<DormEntity> findDormByClazz( String clazz);

    public DormEntity findDormByName( String dormName);

    public boolean deleteDormInBuild( int buildId);

    public List<StuDTO> getStudentDto(int buildId);

    public IPage<StuDTO> getStuDTO(IPage<StuDTO> page, int dormId);

    DormEntity select(String academic, String clazz, String department);
}



